In NAND flash based solid state drive (SSD) devices, the controller manages the process of garbage collection (GC) to consolidate free space. The controller also manages wear leveling (WL) to ensure program and erase (PE) cycles per flash block are all within a certain range. Garbage collection and wear leveling can be managed independently. Both GC and WL trigger reading of selected flash block(s) and rewriting (moving) user data that is still valid to another place. The process of moving user data that is still valid to another place is referred to herein as recycling. In other words, GC and WL are two different criteria of choosing a region (e.g., a block) that is to be recycled, and recycling comprises the rewriting of valid user data in the region to another place. Wear leveling typically has a coarse granularity such that one or more flash blocks are recycled for wear leveling at one time based on a trigger. Wear leveling is typically triggered according to the PE count of one or more blocks. When the wear leveling process occurs, the wear leveling process causes delays and introduces noticeable latencies to other activities. Because of the coarse granularity of the wear leveling and abrupt trigger, host activities can experience large fluctuations in latency.
It would be desirable to implement a method and/or apparatus for applying fine grain wear leveling and garbage collection.